import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入机票价格");
        int ticket = sc.nextInt();
        System.out.println("请输入月份");
        int month = sc.nextInt();
        System.out.println("请输入当前购买的舱位： 0头等舱，1经济舱");
        int seat = sc.nextInt();
        if (month >= 5 && month <= 10) {
            if (seat == 0) {
                ticket = (int) (ticket * 0.9);
            } else if (seat == 1) {
                ticket = (int) (ticket * 0.85);
            } else {
                System.out.println("输入的舱位有误");
            }
        }
        else if ((month >= 11 && month <= 12) || (month >= 1 && month <= 4)) {
            if (seat == 0) {
                ticket = (int) (ticket * 0.7);
            } else if (seat == 1) {
                ticket = (int) (ticket * 0.65);
            } else {
                System.out.println("输入的舱位有误");
            }
        }
        else{
            System.out.println("输入的月份有误");
        }
        System.out.println("最后的机票价格为");                  
    }
}